package com.dinadi.yidi.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.dinadi.yidi.base.BaseFragment;

import java.util.List;


/**
 * Created by ZhangCe on 2016/8/17.
 */
public class MainPagerAdapter extends FragmentPagerAdapter {
    private List<BaseFragment> lists;

    public MainPagerAdapter(FragmentManager fm, List<BaseFragment> lists) {
        super(fm);
        this.lists = lists;
    }

    @Override
    public Fragment getItem(int position) {
        return lists.get(position);
    }

    @Override
    public int getCount() {
        return lists.size();
    }
}
